﻿<Window x:Class="PeerComLink.MainView"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Peer Com Link" Height="500" Width="250" ResizeMode="NoResize">
    <Grid>
        <ListView Name="ContactList" ItemsSource="{Binding MemberStatuses}" Margin="0,44,0,0">
            <ListView.View>
                <GridView>
                    <GridViewColumn Header="Name"  Width="110" DisplayMemberBinding="{Binding Recepient.DisplayName}"/>
                    <GridViewColumn Header="" Width="110">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <StackPanel Margin="6,2,6,2">
                                    <Button Content="{Binding ActionText}" Width="80" Command="{Binding Action}"/>
                                </StackPanel>
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>
        <Button x:Name="btnSave" Content="Save" Margin="0,10,10,0" VerticalAlignment="Top" Height="24" HorizontalAlignment="Right" Width="36" Visibility="Hidden"/>
        <Label Content="Display Name:" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top" VerticalContentAlignment="Center"/>
        <TextBox x:Name="txtUsername" Height="24" Margin="101,10,10,0" TextWrapping="Wrap" Text="{Binding LocalMember.DisplayName}" VerticalAlignment="Top" IsReadOnly="True" Cursor="Hand" MouseDown="txtUsernameOnFocus" GotFocus="txtUsernameOnFocus" LostFocus="txtUsernameOnLostFocus" VerticalContentAlignment="Center"/>
        <Grid Margin="0,0,0,0" VerticalAlignment="Bottom" Height="40" Visibility="Collapsed">
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="*"/>
                <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Button Content="Call" IsEnabled="{Binding ElementName=ContactList, Path=SelectedItem.CanStartCall}" Grid.Column="0"/>
            <Button Content="End" IsEnabled="False" Grid.Column="1"/>
        </Grid>
    </Grid>
</Window>
